import { createApp } from "vue";
import App from "./App.vue";
import "@/style/font.scss";
import "@/style/normalize.css";
import "@/style/public.scss";
import {
  ElButton,
  ElForm,
  ElFormItem,
  ElSelect,
  ElOption,
  ElInput,
  ElRow,
  ElCol,
  ElIcon,
  ElLink,
  ElContainer,
  ElAside,
  ElMenu,
  ElSubmenu,
  ElHeader,
  ElRadioGroup,
  ElRadioButton,
  ElMenuItemGroup,
  ElMenuItem,
  ElMain,
  ElDropdown,
  ElDropdownMenu,
  ElDropdownItem,
  ElAvatar,
  ElScrollbar,
  ElTag,
  ElSpace,
  ElAlert,
} from "element-plus";
import lang from "element-plus/lib/locale/lang/zh-cn";
import "dayjs/locale/zh-cn";
import locale from "element-plus/lib/locale";
import store from "./store/index";
import router from "./router/index";
import glot from "@/scripts/glot";
const components = [
  ElButton,
  ElForm,
  ElFormItem,
  ElSelect,
  ElOption,
  ElInput,
  ElRow,
  ElCol,
  ElIcon,
  ElLink,
  ElContainer,
  ElAside,
  ElMenu,
  ElSubmenu,
  ElHeader,
  ElRadioGroup,
  ElRadioButton,
  ElMenuItemGroup,
  ElMenuItem,
  ElMain,
  ElDropdown,
  ElDropdownMenu,
  ElDropdownItem,
  ElAvatar,
  ElScrollbar,
  ElTag,
  ElSpace,
  ElAlert
];
// const plugins = []
const option = { size: "small", zIndex: 3000 };
const app = createApp(App);
// element全局配置
app.config.globalProperties.$ELEMENT = option;
// 组件注册
components.forEach((component) => {
  app.component(component.name, component);
});
// 插件注册
// plugins.forEach((plugin) => {
//   app.use(plugin)
// })
glot(app);
locale.use(lang);
app.use(router).use(store).mount("#app");